home *** CD-ROM | disk | FTP | other *** search
- unit Rtti5u;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, Grids, DBGrids, DB, DBTables, Menus, RTTI5U2;
-
- type
- TForm1 = class(TForm)
- MainMenu1: TMainMenu;
- N1: TMenuItem;
- N2: TMenuItem;
- N3: TMenuItem;
- N4: TMenuItem;
- DataSource1: TDataSource;
- Table1: TTable;
- DBGrid1: TDBGrid;
- procedure TableMenuClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- {$R *.RES} { Bind in compiled version of RTTI5U.RC }
-
- procedure TForm1.TableMenuClick(Sender: TObject);
- begin
- if Sender is TMenuItem then
- { Ensure menu item is last so the Tag references go to it, not the table }
- with Screen, Table1, TMenuItem(Sender) do
- begin
- Cursor := crHourGlass;
- try
- DisableControls;
- Close;
- if Tag in [1..3] then
- begin
- TableName := LoadStr(TablesOffset + Tag);
- Open;
- end;
- EnableControls;
- finally
- Cursor := crDefault;
- end;
- end;
- end;
-
- end.
-